/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo07_数组的引用传递 {
    public static void main(String[] args) {
        int[] arr = {1, 2, 3};

        for (int i = 0; i <= arr.length - 1; i++) {
            System.out.println(arr[i]+"---");
        }

        System.out.println("----------------------");           // 1,2,3

        method(arr);

        for (int i = 0; i <= arr.length - 1; i++) {
            System.out.println(arr[i]+"---");                  //
        }

        System.out.println("----------------------");
    }

    public static void method(int[] arr) {
        arr[0]=10;
        arr[1]=20;
        arr[2]=30;
    }
}
